/////////////////////////////////////////////////////////////////////////
//	AUTHOR: 		Eric IJzer                                         //
//	FILE:			TCPSocket.cpp                         		       //
//	DESCRIPTION:	Header file of TCPSocket class					   //
/////////////////////////////////////////////////////////////////////////

#ifndef TCPSOCKET_H_
#define TCPSOCKET_H_

/* Includes */
#include <iostream>
#include <sys/socket.h>
#include <netinet/in.h>

/*/ Namespaces */
using namespace std;

class TCPSocket {
public:
	/* Constructor */
	TCPSocket(int portNumber, int queueLength);
	TCPSocket(int sock);

	/* Deconstructor */
	virtual ~TCPSocket();

	/* Public functions */
	TCPSocket* Accept();
private:
	/* Private functions */
	int bindSocket(int portNumber);
	void listen(int queueLength);

	/* Private variables */
	int sock;
};

#endif
